<!-- 响应计划列表片段 -->
<div class="table-responsive">
    <table class="table table-hover">
        <thead>
            <tr>
                <th>#</th>
                <th>计划名称</th>
                <th>负责人</th>
                <th>计划开始时间</th>
                <th>计划结束时间</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <tr th:if="${responses.empty}">
                <td colspan="7" class="text-center">暂无响应计划</td>
            </tr>
            <tr th:each="response, stat : ${responses}">
                <td th:text="${stat.count}"></td>
                <td th:text="${response.name}"></td>
                <td th:text="${response.responsibleName}"></td>
                <td th:text="${#dates.format(response.planStartTime, 'yyyy-MM-dd HH:mm')}"></td>
                <td th:text="${#dates.format(response.planEndTime, 'yyyy-MM-dd HH:mm')}"></td>
                <td>
                    <span th:if="${response.status == 1}" class="badge badge-secondary">未开始</span>
                    <span th:if="${response.status == 2}" class="badge badge-primary">进行中</span>
                    <span th:if="${response.status == 3}" class="badge badge-success">已完成</span>
                    <span th:if="${response.status == 4}" class="badge badge-danger">已逾期</span>
                </td>
                <td>
                    <div class="btn-group btn-group-sm">
                        <a th:href="@{/risk-response/{id}(id=${response.id})}" class="btn btn-info" title="详情">
                            <i class="fa fa-eye"></i>
                        </a>
                        <a th:href="@{/risk-response/edit/{id}(id=${response.id})}" class="btn btn-primary" sec:authorize="hasAnyRole('ADMIN', 'MANAGER')" title="编辑">
                            <i class="fa fa-edit"></i>
                        </a>
                        <button type="button" class="btn btn-danger" th:onclick="'confirmDelete(' + ${response.id} + ')'" sec:authorize="hasAnyRole('ADMIN', 'MANAGER')" title="删除">
                            <i class="fa fa-trash"></i>
                        </button>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
</div>